/**
 * 
 */
package org.mspring.crm.entity.permission;

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author Gao Youbo
 * @since Feb 29, 2012
 */
@Entity
@Table(name = "user_item")
public class UserItem implements Serializable {
    private UserItemPK userItemPK;

    /**
     * 
     */
    public UserItem() {
        // TODO Auto-generated constructor stub
    }

    /**
     * @param userItemPK
     */
    public UserItem(UserItemPK userItemPK) {
        super();
        this.userItemPK = userItemPK;
    }

    @EmbeddedId
    @AttributeOverrides( { @AttributeOverride(name = "userId", column = @Column(name = "user_id", nullable = false)), @AttributeOverride(name = "itemId", column = @Column(name = "item_id", nullable = false)) })
    public UserItemPK getUserItemPK() {
        return userItemPK;
    }

    public void setUserItemPK(UserItemPK userItemPK) {
        this.userItemPK = userItemPK;
    }

}
